#include "zsf_delay.h"

// 微秒延时
void Delay_us(uint32_t Delay)
{
	uint16_t tickstart = __HAL_TIM_GET_COUNTER(&htim11);
	uint16_t wait = Delay;
	HAL_TIM_Base_Start(&htim11);
	while((__HAL_TIM_GET_COUNTER(&htim11) - tickstart) < wait)
	{
	}
	HAL_TIM_Base_Stop(&htim11);
	__HAL_TIM_SET_COUNTER(&htim11, 0);
}
